//
//  MainViewController.m
//  BaichuanDemo
//
//  Created by a on 2019/3/19.
//  Copyright © 2019 MGXD. All rights reserved.
//

#import "MainViewController.h"

@interface MainViewController () <WKNavigationDelegate,WKUIDelegate,UIWebViewDelegate>

@end

@implementation MainViewController
- (instancetype)init
{
    self = [super init];
    if (self) {
//        self.webView.backgroundColor = UIColor.yellowColor;
//        self.webView.navigationDelegate = self;
//        self.webView.UIDelegate = self;
        
        self.web = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)];
        self.web.backgroundColor = UIColor.redColor;
        [self.view addSubview:self.web];
        self.web.delegate = self;
    }
    return self;
}

- (WKWebView *)webView {
    if (!_webView) {
        _webView = [[WKWebView alloc] initWithFrame:self.view.bounds];
    }
    return _webView;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.s
//    self.webView = [[WKWebView alloc] initWithFrame:self.view.bounds];

//    [self.view addSubview:self.webView];

}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
